<?php /* @var $this WorkshiftController */ ?>
<?php if (Yii::app()->user->hasFlash('success')): ?>
    <div class="alert alert-success">  
        <a class="close" data-dismiss="alert">×</a>  
        <?php echo Yii::app()->user->getFlash('success') ?>
    </div>  
<?php endif ?>
<?php if (Yii::app()->user->hasFlash('error')): ?>
    <div class="alert alert-error">  
        <a class="close" data-dismiss="alert">×</a>  
        <?php echo Yii::app()->user->getFlash('error') ?>
    </div>  
<?php endif ?>
<?php $form = $this->beginWidget('CActiveForm'); ?>
<?php /* @var $form CActiveForm */ ?>
<div class="row">
    <div class="span12">
        <fieldset>  
            <legend><?php echo UserModule::t('Update Workshift') ?></legend>  
            <div class='clearfix'>
                <label for="name"><?php echo UserModule::t('Title', array(), 'workshift') ?></label>
                <div class='input'>
                    <?php echo $form->textField($model, 'title', array('size' => 80, 'maxlength' => 100)); ?>
                    <?php echo $form->error($model, 'title'); ?>
                </div>
            </div>
            <div class='clearfix'>
                <label for="from_time">
                    <?php echo UserModule::t('From time', array(), 'workshift') ?>
                </label>
                <div class="input-append bootstrap-timepicker">
                    <?php echo $form->textField($model, 'from_time', array('class' => 'input-small')) ?>
                    <span class="add-on"><i class="icon-time"></i></span>
                    <?php echo $form->error($model, 'from_time'); ?>
                </div>
            </div>
            <div class='clearfix'>
                <label for="to_time">
                    <?php echo UserModule::t('To time', array(), 'workshift') ?>
                </label>
                <div class="input-append bootstrap-timepicker">
                    <?php echo $form->textField($model, 'to_time', array('class' => 'input-small')); ?>
                    <span class="add-on"><i class="icon-time"></i></span>
                    <?php echo $form->error($model, 'to_time'); ?>
                </div>
            </div>
            <div class='clearfix'>
                <label for="wage">
                    <?php echo UserModule::t('Wage', array(), 'workshift') ?>
                </label>
                <div class="clearfix">
                    <?php echo $form->textField($model, 'wage'); ?>
                    <?php echo $form->error($model, 'wage'); ?>
                </div>
            </div>
            <div class='clearfix'>
                <div class='input'>
                    <?php echo CHtml::submitButton(UserModule::t('Save', array(), 'workshift'), array('class' => 'btn btn-primary')); ?>
                    <?php echo CHtml::button(UserModule::t('Cancel', array(), 'workshift'), array('class' => 'btn', 'onclick' => 'javascript:location.href = \'' . $this->createUrl('index') . '\'')) ?>
                </div>
            </div>
        </fieldset> 
    </div>
</div>
<?php $this->endWidget(); ?>
<script type="text/javascript">
    $('#Workshift_to_time,#Workshift_from_time').timepicker();
</script>